// my variable declarations go here
var nVenezuela = 0;		// number of times Austria has been clicked
var nColombia = 0;	// number of times Bangladesh has been clicked
var nBrazil = 0;		// number of times Colombia has been clicked
var nArgentina = 0;	// number of times Ireland has been clicked
var nBolivia = 0;

function showVenezuela()
{

	document.getElementById( "picture" ).src = "images/venezuela.jpg";
	document.getElementById( "picture" ).alt = "This is a picture of Venezuela.";	
	document.getElementById( "picture" ).title = "This is a picture of Venezuela.";				

	document.getElementById( "caption" ).innerHTML = "Pantheon to the great men of Venezuela in Caracas, Venezuela.";
	
	document.getElementById( "picture2" ).src = "images/venezuelaflag.jpg";
	document.getElementById( "picture2" ).alt = "This is a picture of the Venezuelan flag.";	
	document.getElementById( "picture2" ).title = "This is a picture of the Venezuelan flag.";				

	document.getElementById( "caption2" ).innerHTML = "The Flag of Venezuela.";
}

function showColombia()
{

	document.getElementById( "picture" ).src = "images/colombia.jpg";
	document.getElementById( "picture" ).alt = "This is a picture of Colombia.";	
	document.getElementById( "picture" ).title = "This is a picture of Colombia.";				

	document.getElementById( "caption" ).innerHTML = "San Pedro Claver Church in Cartagena, Colombia";

	document.getElementById( "picture2" ).src = "images/colombiaflag.jpg";
	document.getElementById( "picture2" ).alt = "This is a picture of the Colombian flag.";	
	document.getElementById( "picture2" ).title = "This is a picture of the Colombian flag.";				

	document.getElementById( "caption2" ).innerHTML = "The Flag of Colombia.";
}

function showBrazil()
{

	document.getElementById( "picture" ).src = "images/brazil.jpg";
	document.getElementById( "picture" ).alt = "This is a picture of Brazil.";	
	document.getElementById( "picture" ).title = "This is a picture of Brazil.";				

	document.getElementById( "caption" ).innerHTML = "Paraty, on the Green-Coast of Rio de Janeiro state, in Brazil.";

	document.getElementById( "picture2" ).src = "images/brazilflag.jpg";
	document.getElementById( "picture2" ).alt = "This is a picture of the Brazilian flag.";	
	document.getElementById( "picture2" ).title = "This is a picture of the Brazilian flag.";				

	document.getElementById( "caption2" ).innerHTML = "The Flag of Brazil.";
}

function showArgentina()
{

	document.getElementById( "picture" ).src = "images/argentina.jpg";
	document.getElementById( "picture" ).alt = "This is a picture of Argentina.";	
	document.getElementById( "picture" ).title = "This is a picture of Argentina.";				

	document.getElementById( "caption" ).innerHTML = "Lighthouse in Ushuaia, Argentina.";

	document.getElementById( "picture2" ).src = "images/argentinaflag.jpg";
	document.getElementById( "picture2" ).alt = "This is a picture of the Argentinian flag.";	
	document.getElementById( "picture2" ).title = "This is a picture of the Argentinian flag.";				

	document.getElementById( "caption2" ).innerHTML = "The Flag of Argentina.";
}

function showBolivia()
{

	document.getElementById( "picture" ).src = "images/bolivia.jpg";
	document.getElementById( "picture" ).alt = "This is a picture of lion relaxing.";	
	document.getElementById( "picture" ).title = "This is a picture of lion relaxing.";				

	document.getElementById( "caption" ).innerHTML = "Laguna Verde in Bolivia.";

	document.getElementById( "picture2" ).src = "images/boliviaflag.jpg";
	document.getElementById( "picture2" ).alt = "This is a picture of the Bolivian flag.";	
	document.getElementById( "picture2" ).title = "This is a picture of the Bolivian flag.";				

	document.getElementById( "caption2" ).innerHTML = "The Flag of Bolivia.";
}

function visitVenezuela()
{
	nVenezuela = nVenezuela + 1;
}

function visitColombia()
{
	nColombia = nColombia + 1;
}

function visitBrazil()
{
	nBrazil = nBrazil + 1;
}

function visitArgentina()
{
	nArgentina = nArgentina + 1;
}

function visitBolivia()
{
	nBolivia = nBolivia + 1;
}

function isComplete()
{
	// comparing two values == equals, >= greater than or equal, <= less than or equal to
	// > greater than, < less than, != not equals
	if( nVenezuela >= 1 && nColombia >= 1 && nBrazil >= 1 && nArgentina >= 1 && nBrazil >= 1)
	{
		location.href = "congrats.html";
	}
	else
	{
		alert( "You did NOT complete the course!" );
	}
}
